home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
SYS
/
PROG
/
_files
/
_PROG
/
ReadMe
< prev
next >
Wrap
Text File
|
1990-06-10
|
6KB
|
227 lines
!PROG V1.00 - Copyright Chris Murray, 10th June 1990
----------------------------------------------------
Conceived and knocked up overnight, no guarantees...
In my opinion, the RISC OS Desktop provides a great user
interface, but there are some annoying ommissions. When
I'm working on a project, I typically load up 5 or 6 extra
applications (e.g. !BEdit, !Trash, !Twin, !More, !SetType).
Most of these programs perform very similar basic tasks -
you drag a file onto their icon, and they perform:
<some *command> <dragged filename>
The majority of these kind of front ends are written in
BASIC which means (on a 1MB machine) they use usually at
least 16k each, which can soon mount up.
Essentially, !PROG is a PROGgrammable application. You can
alter its function dynamically. This proves to be very
powerful. For example, PROG can provide the basic features
of all those mentioned above (if you enter the correct PROG
command :-). And because you have just the one application
instead of many, you have an emptier desktop, more memory
and less context switches.
SYNTAX
------
You tell PROG what to do by entering a PROG command.
A PROG command 'Line' is defined to be:
Line --> <EOLN>
Line --> {%}COMMAND{*}{;Line}
Line --> @STRING{|}{;Line}
where
<EOLN> is 'end-of-line'
COMMAND is a system/module/transient command
STRING is a string of ASCII characters
Preceeding a command with '%' means it is send straight to
the CLI i.e. NOT executed as a WimpTask. This is needed to
get the correct results sometimes (see below).
A '@' causes the following STRING to be appended into the
keyboard buffer. This allows you to send strings to
editors etc. on entry. The optional '|' character sends a
carriage return at the end (e.g. to simulate pressing the
RETURN key).
The ';' is the conjunction character - it is used to
define the end of each command in a sequence of commands.
Most importantly, the '*' character causes the (current)
dragged filename to be substituted in its place.
An item in braces {} is optional, otherwise it is not.
A Line is defined recursively on itself so you may define
quite complex sequences (up to a max of 255 characters).
OPERATION
---------
Click SELECT or ADJUST on the !PROG icon to pop up the PROG
command window. This displays the current PROG command in
a small writeable icon. To define a PROG command, click on
the writable icon and type in your command. Then, you may
drag files onto the !PROG icon or into its window,
whereupon PROG will try to execute the command. You may
repeat the previous command by clicking on the 'DO' icon in
the PROG window. This also allows you to execute commands
without aby dragged files. Note you may drag multiple
files into PROG, which is very useful when you want to,
for example, set the filetypes of a lot of files to the
same filetype.
Examples
--------
It can be quite annoying when you double click on a sprite
or text file after !Paint or !Edit has been seen (and not
loaded) if you just want to *type or *screenload the file.
Program PROG with
SCREENLOAD *
and it will screenload files dragged into it.
Similarly,
TYPE *
will type the file.
If you wish to UNLOCK some files, program PROG with
ACCESS * WR
or
ACCESS * LRW
to lock them.
To make PROG perform as a (rather dangerous) trashcan:
WIPE * F~C~V~R
To make PROG set file types to FFF (text):
SETTYPE * FFF
To make PROG load dragged files into BASIC:
BASIC -LOAD *
Assuming the BASIC Editor is loaded, this will
automatically call it with the dragged file:
@EDIT| ; BASIC -LOAD *
Note the '@' meaning put "EDIT" into the keyboard
buffer, and the '|' meaning send a return.
This is very useful. If you want to repeatedly edit
the same file you can just click on "DO". You are NOT
automatically put in the home directory of dragged
files though, which means if you save the file, it
will be to the current directory.
Here's another example where you might want the editor
to go to the part you're working on (e.g. PROCbananas):
@EDIT DEFPROCbananas| ; BASIC -LOAD *
You can do similar things for Twin.
If you want to examine files in detail...
FILEINFO * ; COUNT * ; DUMP *
Or how about this...
Filer_OpenDir *
Say you want to open all the directories in a window
(say you're looking for a file). Similarly, for
Filer_CloseDir.
A crude !SetDir...
DIR *
If you drag in a directory icon, your current directory
will be set to it.
You needn't actually have any '*' characters, e.g.
EX
Clicking "DO" will just examine the current directory.
More examples...
HELP FILECOMMANDS
@LISTIFDEFPROC| ; BASIC -LOAD *
@MODE 0| ; @LIST| ; BASIC -LOAD *
MODULES ; ROMMODULES ; ECHO Hello there! ; TIME
DIR $.user ; cc *
%DUMP * { > RAM:OUTPUT }
Note the '%' in the last example. If you don't do this,
the file redirection won't work properly as a WimpTask.
You can have multiple PROGs if you wish. I rarely use
more than 3. Its best to leave their windows open so
you can see what each one's function is (and you can
change them quickly). For that reason, I've made the
PROG windows boundless. That means you can move them
off screen, like DTPs, when you want to clear the screen
up a bit without closing the windows.
I'm away to get some lunch, I'm starving...
Enjoy,
-Chris.
ecwu58@uk.ac.ed.castle
cpm@uk.ac.ed.lfcs